/*  1:   */ package org.jetbrains.jps.model.serialization.java.compiler;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.util.JDOMExternalizerUtil;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsProject;
import org.jetbrains.jps.model.java.JpsJavaExtensionService;
import org.jetbrains.jps.model.java.compiler.JpsJavaCompilerConfiguration;
import org.jetbrains.jps.model.serialization.JpsProjectExtensionSerializer;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public class JpsJavaCompilerWorkspaceConfigurationSerializer
/* 12:   */   extends JpsProjectExtensionSerializer
/* 13:   */ {
/* 14:   */   public JpsJavaCompilerWorkspaceConfigurationSerializer()
/* 15:   */   {
/* 16:31 */     super("workspace.xml", "CompilerWorkspaceConfiguration");
/* 17:   */   }
/* 18:   */   
/* 19:   */   public void loadExtension(@NotNull JpsProject paramJpsProject, @NotNull Element paramElement)
/* 20:   */   {
/* 21:36 */     if (paramJpsProject == null) {
/* 22:36 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/serialization/java/compiler/JpsJavaCompilerWorkspaceConfigurationSerializer", "loadExtension" }));
/* 23:   */     }
/* 24:36 */     if (paramElement == null) {
/* 25:36 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/jps/model/serialization/java/compiler/JpsJavaCompilerWorkspaceConfigurationSerializer", "loadExtension" }));
/* 26:   */     }
/* 27:36 */     JpsJavaCompilerConfiguration localJpsJavaCompilerConfiguration = JpsJavaExtensionService.getInstance().getOrCreateCompilerConfiguration(paramJpsProject);
/* 28:37 */     String str1 = JDOMExternalizerUtil.readField(paramElement, "ASSERT_NOT_NULL");
/* 29:38 */     if (str1 != null) {
/* 30:39 */       localJpsJavaCompilerConfiguration.setAddNotNullAssertions(Boolean.parseBoolean(str1));
/* 31:   */     }
/* 32:41 */     String str2 = JDOMExternalizerUtil.readField(paramElement, "CLEAR_OUTPUT_DIRECTORY");
/* 33:42 */     localJpsJavaCompilerConfiguration.setClearOutputDirectoryOnRebuild((str2 == null) || (Boolean.parseBoolean(str2)));
/* 34:   */   }
/* 35:   */   
/* 36:   */   public void saveExtension(@NotNull JpsProject paramJpsProject, @NotNull Element paramElement)
/* 37:   */   {
/* 38:47 */     if (paramJpsProject == null) {
/* 39:47 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/serialization/java/compiler/JpsJavaCompilerWorkspaceConfigurationSerializer", "saveExtension" }));
/* 40:   */     }
/* 41:47 */     if (paramElement == null) {
/* 42:47 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/jps/model/serialization/java/compiler/JpsJavaCompilerWorkspaceConfigurationSerializer", "saveExtension" }));
/* 43:   */     }
/* 44:   */   }
/* 45:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.serialization.java.compiler.JpsJavaCompilerWorkspaceConfigurationSerializer

 * JD-Core Version:    0.7.0.1

 */